<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CTLTA005</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/antigo/css/style.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/antigo/css/atributos.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/antigo/css/botoes.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/antigo/css/bootstrap.min.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/antigo/css/bootstrap-theme.min.css">
<script src="${pageContext.request.contextPath}/resources/antigo/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/resources/antigo/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/antigo/js/sispfuncoes.js"></script>
<script type="text/javascript">
	botoes = "1001010000";
	function validateForm() {
		var operacao = document.getElementById("operacao").value;
		var inicio = document.getElementById("inicio").value;
		var wfinal = document.getElementById("wfinal").value;
		var observ = document.getElementById("observ").value;

		if (operacao == "AID" && inicio == 0) {
			alert("INFORME O INTERVALO INICIAL");
			document.getElementById("inicio").focus();
			return false;
		}
		if (operacao == "AID") {
			if (wfinal == 0) {
				alert("INFORME INTERVALO FINAL");
				document.getElementById("wfinal").focus();
				return false;
			}
			if (wfinal < inicio) {
				alert("INTERVALO FINAL MENOR QUE INICIO");
				document.getElementById("wfinal").focus();
				return false;
			}
			if (wfinal > (inicio + 1000)) {
				alert("INFORME INTERVALO MAXIMO DE 1.000 CARTEIRAS");
				document.getElementById("wfinal").focus();
				return false;
			}
		}
		if (operacao == "AID") {
			if (observ == "") {
				alert("INFORME MOTIVO CANCELAMENTO");
				document.getElementById("observ").focus();
				return false;
			}
		}
		return true;
	}
</script>
</head>
<body onunload="">
	<form id="form" action="." onsubmit="return validateForm();" method="post">
		<jsp:include page="/resources/antigo/include/header.jsp" />
		<div id="conteudo">
			<div class="content">
				<center>
					<div id="container" style="height: auto; width: 800px; float: inherit;">
						<div id="espaco" style="height: 100%; width: 95%; margin: 0 auto;">
							<br />
							<div class="row">
								<div align="left" class="col-lg-1" style="width: 75px; float: left">
									<label class="control-label">GEJUSPC</label>
								</div>
								<div align="left" class="col-lg-8" style="width: 635px; float: left">
									<label class="control-label"> - Gerencia da Justica, Seguranca Publica e Cidadania</label>
								</div>
								<div align="right" style="width: 100px; float: left">
									<label class="control-label">VER.: ${versao}</label>
								</div>
							</div>
							<div class="row">
								<div align="left" class="col-lg-1" style="width: 75px; float: left">
									<label class="control-label">STI</label>
								</div>
								<div align="left" class="col-lg-1" style="width: 570px; float: left">
									<label class="control-label">- SUBGERENCIA DE TECNOLOGIA DA INFORMACAO</label>
								</div>
								<div align="left" class="col-lg-1" style="width: 65px; float: left">
									<input type="text" id="operacao" onkeypress="return enviar(this, event)" style="text-transform: uppercase" name="ctlta005.operacao" class="form-control input-cb" value="${ctlta005.operacao}" maxlength="3" size="3" />
								</div>
								<div align="right" style="width: 100px; float: left">
									<label class="control-label">${dataCorrente}</label>
								</div>
							</div>
							<div class="row">
								<div align="left" class="col-lg-1" style="width: 75px; float: left">
									<label class="control-label">SISP</label>
								</div>
								<div align="left" class="col-lg-8" style="width: 635px; float: left">
									<label class="control-label">- Sistema de Informacoes de Seguranca Publica</label>
								</div>
								<div align="right" style="width: 100px; float: left">
									<label class="control-label">${horaCorrente}</label>
								</div>
							</div>
							<div class="row">
								<div align="left" class="col-lg-1" style="width: 75px; float: left">
									<label class="control-label">IIC</label>
								</div>
								<div align="left" class="col-lg-9" style="width: 500px; float: left">
									<label class="control-label">- INSTITUTO DE IDENTIFICACAO CIVIL</label>
								</div>
							</div>
							<label class="corpo_c">_________________________________________________________________________________________</label>
							<br />
							<br />
							<div class="row">
								<div align="center" class="col-lg-8" style="width: 500px; float: inherit">
									<label class="control-label">CANCELA DOCUMENTO POR INTERVALO DE NUMEROS</label>
								</div>
							</div>
							<br />
							<br />
							<div class="row">
								<div align="left" class="col-lg-8" style="width: 225px; float: left">
									<label class="control-label">DOCUMENTO</label>
								</div>
								<div align="left" class="col-lg-8" style="width: 225px; float: left">
									<label class="control-label">NUMEROS</label>
								</div>
							</div>
							<br />
							<br />
							<div class="row">
								<div class="col-lg-4" align="left" style="width: 225px; float: left">
									<label class="control-label">INICIAL:</label>
								</div>
								<div class="col-lg-3" style="width: 200px; float: left">
									<input type="text" id="inicio" onkeypress="return somenteNumero(event)" name="ctlta005.inicio" class="form-control input-cb" value="${ctlta005.inicio}" maxlength="13" size="13" />
								</div>
							</div>
							<br />
							<div class="row">
								<div class="col-lg-4" align="left" style="width: 225px; float: left">
									<label class="control-label">FINAL:</label>
								</div>
								<div class="col-lg-2" style="width: 200px; float: left">
									<input type="text" id="wfinal" name="ctlta005.wfinal" class="form-control input-cb" value="${ctlta005.wfinal}" maxlength="13" size="13" />
								</div>
							</div>
							<br />
							<div class="row">
								<div class="col-lg-4" align="left" style="width: 225px; float: left">
									<label class="control-label">MOTIVO DO CANCELAMENTO:</label>
								</div>
								<div class="col-lg-5" style="width: 365px; float: left">
									<input type="text" id="observ" name="ctlta005.observ" class="form-control input-cb" value="${ctlta005.observ}" maxlength="30" size="30" />
								</div>
							</div>
							<br />
							<br />
							<label class="corpo_c">______________________________________________________________________________________________________________________________________</label>
							<div class="row">
								<div align="center" class="col-lg-4" style="width: 200px; float: left">
									<label class="control-label">ESC p/ Voltar</label>
								</div>
								<div align="center" class="col-lg-1" style="width: 430px; float: left">
									<label class="control-label">${empresa} - ${programa}</label>
								</div>
								<div align="center" class="col-lg-1" style="width: 200px; float: right">
									<label class="control-label">CTRL + Z p/ Sair</label>
								</div>
							</div>
							<br />
							<div class="row">
								<label class="control-label mensagem" id="mensagem">${ctlta005.mensagem}</label>
							</div>
							<input type="hidden" id="funcao" name="ctlta005.funcao" value="${ ctlta005.funcao }" maxlength="1" size="1" />
							<input type="hidden" id="campofocus" name="ctlta005.campofocus" value="${ ctlta005.campofocus }" maxlength="30" size="30" />
							<input type="hidden" id="navegar" name="ctlta005.navegar" value="${ ctlta005.navegar }" />
							<br />
						</div>
					</div>
				</center>
			</div>
		</div>
		<jsp:include page="/resources/antigo/include/footer.jsp" />
	</form>
</body>
</html>
